<template>
  <!-- Form -->
  <el-dialog title="预警条件" :visible.sync="visible">
    <div>
      <el-tag type="danger">
        1.默认预警条件
      </el-tag>
      <div>
        满足以下
        <el-radio v-model="radio" label="1">
          全部条件
        </el-radio>
        <el-radio v-model="radio" label="2">
          任意条件时触发预警
        </el-radio>
      </div>
      <div class="block">
        <span class="demonstration" />
        <el-cascader
          v-model="value"
          :options="options"
          :props="{ expandTrigger: 'hover' }"
          @change="handleChange"
        />
      </div>
      <el-tag type="danger">
        2.下级指标
      </el-tag>
      <el-form>
        <el-form-item label=" 区域A">
          <el-select placeholder="请选择活动区域">
            <el-option label="区域一" />
            <el-option label="区域二" />
          </el-select>
        </el-form-item>
        <el-form-item label="区域B">
          <el-select placeholder="请选择活动区域">
            <el-option label="区域一" />
            <el-option label="区域二" />
          </el-select>
        </el-form-item>
        <el-form-item label="区域C">
          <el-select placeholder="请选择活动区域">
            <el-option label="区域一" />
            <el-option label="区域二" />
          </el-select>
        </el-form-item>
        <el-form-item label="区域D">
          <el-select placeholder="请选择活动区域">
            <el-option label="区域一" />
            <el-option label="区域二" />
          </el-select>
        </el-form-item>
        <el-form-item label="区域E">
          <el-select placeholder="请选择活动区域">
            <el-option label="区域一" />
            <el-option label="区域二" />
          </el-select>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="visible = false">
          取 消
        </el-button>
        <el-button type="primary" @click="visible = false">
          确 定
        </el-button>
      </div>
    </div>
  </el-dialog>
</template>

<script>
export default {
  props: {
    visible: { type: Boolean }
  },
  data() {
    return {
      radio: '1',
      value: [],
      options: [
        {
          value: 'guide',
          label: '指南',
          children: [
            {
              value: 'principles',
              label: '设计原则',
              children: [
                {
                  value: 'yes',
                  label: '一致'
                },
                {
                  value: 'feedback',
                  label: '反馈'
                },
                {
                  value: 'effective',
                  label: '效率'
                },
                {
                  value: 'control',
                  label: '可控'
                }
              ]
            },
            {
              value: 'navigation',
              label: '导航',
              children: [
                {
                  value: 'lateral',
                  label: '侧向导航'
                },
                {
                  value: 'top',
                  label: '顶部导航'
                }
              ]
            }
          ]
        },
        {
          value: 'module',
          label: '组件',
          children: [
            {
              value: 'basic',
              label: '组件1',
              children: [
                {
                  value: 'layout',
                  label: '布局'
                },
                {
                  value: 'color',
                  label: '色彩'
                },
                {
                  value: 'typography',
                  label: '字体'
                },
                {
                  value: 'icon',
                  label: '图标'
                },
                {
                  value: 'button',
                  label: '按钮'
                }
              ]
            },
            {
              value: 'form',
              label: '表单',
              children: [
                {
                  value: 'radio',
                  label: '单选框'
                },
                {
                  value: 'checkbox',
                  label: '多选框'
                },
                {
                  value: 'input',
                  label: '输入框'
                },
                {
                  value: 'input-number',
                  label: '计数器'
                },
                {
                  value: 'select',
                  label: '选择器'
                },
                {
                  value: 'cascader',
                  label: '级联选择器'
                },
                {
                  value: 'switch',
                  label: '开关'
                },
                {
                  value: 'slider',
                  label: '滑块'
                },
                {
                  value: 'time-picker',
                  label: '时间选择器'
                },
                {
                  value: 'date-picker',
                  label: '日期选择器'
                },
                {
                  value: 'datetime-picker',
                  label: '日期时间选择器'
                },
                {
                  value: 'upload',
                  label: '上传'
                },
                {
                  value: 'rate',
                  label: '评分'
                },
                {
                  value: 'former',
                  label: '表单1'
                }
              ]
            },
            {
              value: 'data',
              label: '数据',
              children: [
                {
                  value: 'table',
                  label: '表格'
                },
                {
                  value: 'tag',
                  label: '标签'
                },
                {
                  value: 'progress',
                  label: '进度条'
                },
                {
                  value: 'tree',
                  label: '树形控件'
                },
                {
                  value: 'pagination',
                  label: '分页'
                },
                {
                  value: 'badge',
                  label: '标记'
                }
              ]
            },
            {
              value: 'notice',
              label: '通知',
              children: [
                {
                  value: 'alert',
                  label: '警告'
                },
                {
                  value: 'loading',
                  label: '加载'
                },
                {
                  value: 'message',
                  label: '消息提示'
                },
                {
                  value: 'message-box',
                  label: '弹框'
                },
                {
                  value: 'notification',
                  label: '通知'
                }
              ]
            },
            {
              value: 'navigation',
              label: '导航栏',
              children: [
                {
                  value: 'menu',
                  label: '导航菜单'
                },
                {
                  value: 'tabs',
                  label: '标签页'
                },
                {
                  value: 'breadcrumb',
                  label: '面包屑'
                },
                {
                  value: 'dropdown',
                  label: '下拉菜单'
                },
                {
                  value: 'steps',
                  label: '步骤条'
                }
              ]
            },
            {
              value: 'others',
              label: '其他',
              children: [
                {
                  value: 'dialog',
                  label: '对话框'
                },
                {
                  value: 'tooltip',
                  label: '文字提示'
                },
                {
                  value: 'popover',
                  label: '弹出框'
                },
                {
                  value: 'card',
                  label: '卡片'
                },
                {
                  value: 'carousel',
                  label: '走马灯'
                },
                {
                  value: 'collapse',
                  label: '折叠面板'
                }
              ]
            }
          ]
        },
        {
          value: 'resources',
          label: '资源',
          children: [
            {
              value: 'axure',
              label: '选择1'
            },
            {
              value: 'sketch',
              label: '选择2'
            },
            {
              value: 'jiaohu',
              label: '组件交互文档'
            }
          ]
        }
      ]
    }
  },
  computed: {},
  watch: {},
  methods: {
    handleChange() {
      console.log('1111111')
    }
  }
}
</script>

<style scoped lang="scss"></style>
